package com.hg.wap.service;

import com.hg.wap.db.dao.UserDAO;
import com.hg.wap.db.dto.UserDTO;
import com.hg.wap.vo.VO4user;

public class UserCenterService
{
	UserDAO udao = new UserDAO();
	
	public VO4user findByUsername(String username) {
		VO4user vo = null;
		UserDTO dto = udao.findByUsername(username);
		if (dto != null) {
			vo = new VO4user();			
			vo.userName = dto.getUser_name();
			vo.password = dto.getUser_pwd();
			vo.mobile = dto.getMobile();
			vo.email = dto.getEmail();
			vo.birth_day = dto.getBday();
			vo.birth_month = dto.getBmonth();
			vo.birth_year = dto.getByear();
			vo.money = dto.getMoney().toString();
			vo.yongjin = dto.getFx_money().toString();
			vo.user_pic = dto.getUser_pic();
			vo.wechat_id = dto.getWechat_id();
			vo.wx_openid = dto.getWx_openid();
			vo.score = dto.getScore().toString();
		}
		return vo;
	}
}
